<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
<head>
    <meta charset="utf-8"/>
    <title>CMS后台管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <link th:replace="resource :: css" rel="stylesheet"/>
</head>
<body>
<div class="container-fluid">
    <form class="form-horizontal" role="form" action="update" method="post">
        <input type="hidden" name="id" value="$!entity.id">
        <div class="form-group">
            <label class="col-sm-2 control-label">父栏目</label>
            <div class="col-sm-10">
                <select class="form-control" name="parent.id">
                    #foreach($e in $!channels)
                        <option value="$!e.id" #if($!e.id == $!entity.parent.id) selected #end>$!e.name</option>
                    #end
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">状态</label>
            <div class="col-sm-10">
                <select class="form-control" name="userState">
                    #foreach($e in $!checkStates)
                        <option value="$!e" #if($!e == $!entity.userState) selected #end>$!e.name</option>
                    #end
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">排序</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" placeholder="" name="rankNo" value="$!entity.rankNo">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">栏目名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" placeholder="" name="name" value="$!entity.name">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">单页面</label>
            <div class="col-sm-10">
                <input type="checkbox" class="tfbox" name="isSingle" value="$!entity.isSingle" #if($!entity.isSingle)checked#end/>
                <lable>[此栏目将以单个页面而不是文章列表的形式显示，显示内容为栏目内容]</lable>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">导航栏</label>
            <div class="col-sm-10">
                <input type="checkbox" class="tfbox" name="showNavbar" value="$!entity.showNavbar" #if($!entity.showNavbar)checked#end/>
                <lable>[此栏目将在导航栏中显示]</lable>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">首页</label>
            <div class="col-sm-10">
                <input type="checkbox" class="tfbox" name="showHome" value="$!entity.showHome" #if($!entity.showHome)checked#end/>
                <lable>[此栏目下文章列表将在首页中部显示，不适合单页面]</lable>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">栏目说明</label>
            <div class="col-sm-10">
                <textarea class="form-control" rows="5" name="info">$!entity.info</textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">保存</button>
                <a class="btn btn-success" href="list">返回</a>
            </div>
        </div>
    </form>
</div>
    <script th:replace="resource :: js"></script>
</body>
</html>
